package com.hmall.user.service;

import com.hmall.user.domain.dto.AddRoleDTO;
import com.hmall.user.domain.dto.UpdateRoleDTO;
import com.hmall.user.domain.po.SysPermissions;
import com.hmall.user.domain.po.SysRoles;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author yangfeng
* @description 针对表【sys_roles(角色管理信息表)】的数据库操作Service
* @createDate 2024-12-17 16:36:29
*/
public interface SysRolesService extends IService<SysRoles> {

    Boolean addRole(AddRoleDTO dto);

    Boolean updateRole(UpdateRoleDTO dto);
    /**
     * 查询用户对应的角色id
     * @param userId
     * @Return: java.util.List<java.lang.Integer>
     * @author: yangfeng
     * @date: 2024/12/26 13:49
     **/
    List<Integer> getRolesByUserId(Long userId);

    SysRoles getRoleById(Integer id);

    List<SysPermissions> getPermissionByUserId(Long userId);

    List<SysPermissions> getPermissionByRoleId(Integer roleId);

    List<SysPermissions> getPermissionByRoleId(Integer...roleIds);
}
